﻿@model Jb.Web.ViewModels.InterviewRequestViewModel
@using Jb.Web.Utility;
@{
    //String pageTitle = "Edit InterviewRequest";
    //if (Model != null && Model.ID == 0)
    //{             
    //    pageTitle = "Add New InterviewRequest";
    //}
    //ViewBag.Title = Html.GetPageTitle(pageTitle);	
	bool _HasSaved = ViewData.HasSaved();
}

@using (Html.BeginForm("SendInterviewRequest", "JobApplication", FormMethod.Post, new { id = "frmInterviewRequest" }))
{
    @Html.ValidationSummary(true)

    if (Model == null)
    {
        @: @Html.WarningMessageBox("Sorry! Requested InterviewRequest was not found for edit.")
    }
    else
    {
        if (_HasSaved)
        {
            @Html.SuccessMessageBox("Congratulations! The Interview Request sent successfully")
        }
        else if (ViewData[AppConstants.ViewDataKeys.SAVED] != null && !_HasSaved)
        {
            @Html.WarningMessageBox("Sorry! we could not save the Interview Request.")
        }
		@Html.HiddenFor(model => model.ID)
        @Html.HiddenFor(model => model.ApplicationID)

		@*<div class="editor-label">
			@Html.LabelFor(model => model.ApplicationID)
		</div>
		<div class="editor-field">
			@Html.TextBoxFor(model => model.ApplicationID)
			@Html.ValidationMessageFor(model => model.ApplicationID)
		</div>*@
		<div class="editor-label">
			@Html.LabelFor(model => model.InvitationDate)
		</div>
		<div class="editor-field">
			@Html.TextBoxFor(model => model.InvitationDate, new { @class = "datepicker"})
            @Html.DropDownListFor(model => model.InterviewHour, BindSelectList.Hours(), new { style="width:75px;"})
            @Html.DropDownListFor(model => model.InterviewMinute, BindSelectList.Minutes(), new { style = "width:85px;" })
			@*@Html.ValidationMessageFor(model => model.InvitationDate)
            @Html.ValidationMessageFor(model => model.InterviewHour)
			@Html.ValidationMessageFor(model => model.InterviewMinute)*@
		</div>
        <div class="editor-label">
			@Html.LabelFor(model => model.Message)
            <div class="jb-label-hint">You can give some customized message here, if you want. Interview date and time will be added automatically in the email.</div>
		</div>
		<div class="editor-field">
            @Html.TextAreaFor(model => model.Message, new { @class="jb-long-text"})
            <div>
            @Html.ValidationMessageFor(model => model.Message)
            </div>
        </div>						
    }
}
@*</div>*@

